
OBJS	=	ascendancy.o\
		galaxy.o\
		solar_system.o\
		render_galaxy.o\
		render_common.o\
		render_menu.o

CC	= g++
DEBUG	= -g

LIBDIRS	= -L/usr/X11R6/lib -L/usr/X11R6/lib64 -L/usr/local/lib
INCDIRS	= -I/usr/include -L/usr/local/include -L/usr/X11R6/include

CFLAGS	= -Wall -pedantic -c $(DEBUG) $(INCDIRS)
LIBS	= -lX11 -lXi -lXmu -lglut -lGL -lGLU -lm
LFLAGS	= -Wall -pedantic $(DEBUG)

all:	ascendancy

ascendancy:	$(OBJS)
	$(CC) $(LFLAGS)  $(OBJS) -o ascendancy $(LIBS)

ascendancy.o:	ascendancy.h ascendancy.cxx\
		galaxy.h\
		render_galaxy.h\
		solar_system.h\
	 	render_menu.h
	$(CC) $(CFLAGS) ascendancy.cxx

render_common.o:	render_common.h render_common.cxx
	$(CC) $(CFLAGS) render_common.cxx

galaxy.o:	galaxy.h galaxy.cxx solar_system.h
	$(CC) $(CFLAGS) galaxy.cxx

render_galaxy.o:	render_galaxy.h render_galaxy.cxx galaxy.h
	$(CC) $(CFLAGS) render_galaxy.cxx

render_menu.o:	render_menu.h render_menu.cxx render_common.h
	$(CC) $(CFLAGS) render_menu.cxx

solar_system.o:	solar_system.h solar_system.cxx
	$(CC) $(CFLAGS) solar_system.cxx 

clean:
	rm *.o *~ ascendancy
